class Solution {
public:
    char firstUniqChar(string s) {
        unordered_map<char,int> map;
        for(auto e:s){
            map[e]++;
        }
        for(int i=0;i<s.size();++i){
            if(map[s[i]]==1){
                return s[i];
            }
        }
        return ' ';
    }
};